--- Makefile.orig	2013-07-29 16:43:11.000000000 -0700
+++ Makefile	2014-03-23 23:09:17.353715034 -0700
@@ -181,14 +181,13 @@
 
 install:
 	mkdir -p $(DATADIR)/icons
-	mkdir -p $(PREFIX)/share/pixmaps
-	install -m 0755 $(BIN) $(BINDIR)
-	install -m 0644 source/unix/icons/nestopia.desktop $(DATADIR)
-	install -m 0644 NstDatabase.xml $(DATADIR)
+	install -Dm 0755 $(BIN) $(BINDIR)/$(BIN)
+	install -Dm 0644 source/unix/icons/nestopia.desktop $(DATADIR)/nestopia.desktop
+	install -Dm 0644 NstDatabase.xml $(DATADIR)/NstDatabase.xml
 	install -m 0644 source/unix/icons/*.png $(DATADIR)/icons
 	install -m 0644 source/unix/icons/*.svg $(DATADIR)/icons
-	install -m 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps
-	xdg-desktop-menu install --novendor $(DATADIR)/nestopia.desktop
+	install -Dm 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps/nestopia.svg
+	install -Dm 0644 $(DATADIR)/nestopia.desktop $(PREFIX)/share/applications/nestopia.desktop
 
 uninstall:
 	xdg-desktop-menu uninstall $(DATADIR)/nestopia.desktop
